package com.cxd.message.exception;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Properties;

public abstract class AppConstants {

	private static Properties props;
	static {
		props = new Properties();
		try {
			props.load(Thread.currentThread().getContextClassLoader()
					.getResourceAsStream("app.properties"));
		} catch (FileNotFoundException e) {
			throw new RuntimeException("找不到app.properties文件", e);
		} catch (IOException e) {
			throw new RuntimeException("读取app.properties文件出错", e);
		}
	}

	public static final class RequestUrl {
		/**APP 充值请求URL*/
		public static final String APP_RECHARGE_URL = props.getProperty("app_recharge_url");
		/**APP 投资请求URL*/
		public static final String APP_INVEST_URL = props.getProperty("app_invest_url");
		/**APP 提现请求URL*/
		public static final String APP_WITHDRAW_URL = props.getProperty("app_withdraw_url");
		/**APP 绑卡请求URL*/
		public static final String APP_BINDCARD_URL = props.getProperty("app_bindcard_url");
		/**APP 实名认证请求URL*/
		public static final String APP_AUTHENTICATION_URL = props.getProperty("app_authentication_url");
		/**APP  重置密码URL */
		public static final String APP_RESET_PASSWORD_URL = props.getProperty("app_reset_password_url");
		/**APP  修改手机号URL */
		public static final String APP_RESET_MOBILE_URL = props.getProperty("app_reset_mobile_url");
	}
	
	public static final class PublicConstants{
		public static final String YEE_IS_TEST = props.getProperty("yee_is_test");
		public static final String BANK_CARD_DEFAULT_URL = props.getProperty("bank_card_default_url");
		public static final String BANK_CARD_URL = props.getProperty("bank_card_url");
		public static final String IMG_ROOT_URL = props.getProperty("img_root_url");
		public static final String WWW_LOAN_URL = props.getProperty("www_loan_url");
		public static final String PIC_POINT_HTTP_PREFIX = props.getProperty("pic_point_http_prefix");
		
		
		/**
		 * 投资后提示页面拦截路径
		 */
		public static final String APP_RECHARGE_BACK_INTERCEPT = props.getProperty("app_recharge_back_intercept");
		
	}
	public static final class ResponseWebUrl{
		/** 同步回调地址前缀*/
		public static final String PRE_RESPONSE_URL = props
				.getProperty("resopnse.webUrl");
	}
	
	public static final class ResponseS2SUrl{
		
		/** 异步回调地址前缀*/
		public static final String PRE_RESPONSE_URL = props
				.getProperty("response.s2sUrl");
	}
	
	public static final class Ancun{
		public static final String ANCUN_H5_URL = props.getProperty("ancun_h5_url");
		
		public static final String NO_ANCUN = "0";
		public static final String YES_ANCUN = "1";
	}
}
